package com.coolingme.battercake.decorator;

/**
 * 定义扩展套餐的抽象装饰器
 *
 * @author wangyue
 * @date 2020-09-15 23:29
 */
public abstract class BattercakeDecorator extends Battercake {

    /**
     * 静态代理，委派
     */
    private Battercake battercake;

    public BattercakeDecorator(Battercake battercake) {
        this.battercake = battercake;
    }

    @Override
    protected String getMsg() {
        return this.battercake.getMsg();
    }

    @Override
    protected Double getPrice() {
        return this.battercake.getPrice();
    }
}
